let activeRanking = {}
if (localStorage.getItem('ActiveRanking')) {
  let ActiveRanking = JSON.parse(localStorage.getItem('ActiveRanking'))
  let EnterpriseName = []
  let EnterpriseUser = []
  if(ActiveRanking.data.length){
      for (let i = 0; i < ActiveRanking.data.length; i++) {
      EnterpriseName.push(ActiveRanking.data[i].G0ENTERPRISE_NAME)
      EnterpriseUser.push(ActiveRanking.data[i].K0VIEW_CNT)
    }
  }
  activeRanking = {
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        type: 'shadow'
      }
    },
    grid: {
      left: '3%',
      right: '4%',
      bottom: '3%',
      containLabel: true
    },
    color: ['#de6647'],
    xAxis: {
      type: 'value',
      boundaryGap: [0, 0.01],
      show: false
    },
    yAxis: {
      axisLabel: {
        interval: 0
      },
      type: 'category',
      data: EnterpriseName,
      axisTick: {
        show: false //不显示坐标轴刻度线
      },
      axisLine: {
        show: false, //不显示坐标轴线
      },
    },
    series: [{
      type: 'bar',
      data: EnterpriseUser
    },],
    label: {
      show: true,
      position: 'inside',
      color: 'white'
    },
  }
}

export default activeRanking